#include <iostream>

using namespace std;

int max_subscript(int arr[], int capacity)
{
    int index = 0;

    for (int i = 1; i <= capacity; i++)
    {
        if (arr[i] > arr[index])
        {
            index = i;
        }
    }
    return index;
}

int main(int argc, char const *argv[])
{
    int arr[10] = {1, 3, 5, 7, 9, 2, 4, 6, 8, 10};

    int a = max_subscript(arr, 10);
    cout << "数组中最大值下标为：" << a << endl;
    return 0;
}
